﻿using System;
using System.Collections.Generic;
using System.Text;

using ECCIT;
using System.Linq;
using OgilvyOne.UKNow.IDAL;
using OgilvyOne.UKNow.DAL;
using System.Collections;
using OgilvyOne.UKNow.Model;
using ECCIT.Data;
using System.Data;

namespace OgilvyOne.UKNow.BLL
{
    public class EventSponsorLogoBLL
    {
        //插入新记录
        public bool Add(EventSponsorLogoModel model)
        {
            EventSponsorLogoDAL user = new EventSponsorLogoDAL();
            return user.Add(model);
        }

        //根据langID和EventsID获取数据记录,显示列表
        public DataTable getSponLogoModel(int langID, int? EventsID)
        {
            EventSponsorLogoDAL user = new EventSponsorLogoDAL();
            DataTable dt = user.getSponLogoData(langID, EventsID);
            return dt;
        }
        //仅根据赞助商LogoID来查询一条数据记录,LogoID是主键,与langID无关
        public EventSponsorLogoModel getSponLogoModel( int logoID)
        {
            EventSponsorLogoDAL use = new EventSponsorLogoDAL();
            return use.GetSponLogoModel( logoID);
        }
        //仅根据赞助商LogoID来删除数据记录,LogoID是主键
        public bool delSponLogoModel(int logoID)
        {
            EventSponsorLogoDAL use = new EventSponsorLogoDAL();
            return use.delete(logoID);
            
        }
        //仅根据LogoID来修改编辑页面中要修改的字段
        public bool update(EventSponsorLogoModel model)
        {
            EventSponsorLogoDAL use = new EventSponsorLogoDAL();
            return use.Update(model);
        }
    }

}
